package two;

/**
 * Created with IntelliJ IDEA.
 * ClassName: Test
 * Package: two
 * Description:
 * User: fzykd
 *
 * @Author: LQH
 * Date: 2023-08-15
 * Time: 18:14
 */

//计算二维数组中值的和
public class Test {
    public static void main(String[] args) {

        int[][] arr = new int[][]{{3,5,8},{12,9},{7,0,6,4}};

        int max = 0;
        for (int i = 0; i < arr.length; i++) {
            for (int j = 0; j < arr[i].length; j++) {
                max = max + arr[i][j];
            }
        }

        System.out.println(max);

    }
}
